<?php 
if($this->Admin_model->check_trung(array('ip'=>$this->input->ip_address()),'users')){ 
    $this->session->set_userdata('loidk',$this->input->ip_address().' - Ip already exists</br>');
    $t=0;                
}else{
    $t=1;
}
if(validation_errors()||$this->session->userdata('loidk')){
    echo ' 
     <ul data-role="listview" data-inset="true">    
            <li data-role="list-divider">Error <span class="ui-li-count">1</span></li>
            <li><a href="'.base_url().'mobile/register">';       
                 echo form_error('username');
                 echo form_error('password'); 
                 echo form_error('passconf'); 
                 echo form_error('email');
                 echo form_error('paypal');
                 echo $this->session->userdata('loidk');          
                               
     echo   '</a></li></ul>';
      $this->session->unset_userdata('loidk');
    
} 
if($t==1):
?> 

<form method="post" action="<?=base_url();?>mobile/register" data-ajax="false" >      
      <input type="text" name="username" id="fname" placeholder="Username..."/>
      <input name="password" id="password" value="" autocomplete="off" type="password" placeholder="Password..."/>
      <input name="passwordf" id="password" value="" autocomplete="off" type="password" placeholder="Confirm Password..."/>
      <input type="text" name="email" id="fname" placeholder="Email..."/>
      <input type="text" name="paypal" id="fname" placeholder="Payment Email..."/>
      <input type="text" name="groupid" id="fname" placeholder="Ref"/>
      <input type="submit" data-inline="true" value="Submit"/>
    </form>
<?php endif;?>